home *** CD-ROM | disk | FTP | other *** search
- #include "inter.h"
- #include<stdio.h>
- #include<process.h>
- interface_class iface;
- void initg()
- {
- int gdriver = DETECT, gmode, errorcode;
- initgraph(&gdriver, &gmode, "");
- // errorcode = graphresult();
- settextstyle(DEFAULT_FONT,HORIZ_DIR,1);
- }
- char deet[127];
-
- test_box()
- {
- iface.clear();
- iface.addbox(123,28,394,265);
- iface.addtitle("A General",131,12,BLUE,4,GOTHIC_FONT);
- iface.addtitle("Example",147,50,BLUE,4,GOTHIC_FONT);
- iface.addcheckbox("A Checkbox",40,100,3,UNCHECKED);
- iface.addtitle("Some Lines",250,130,RED,4,SMALL_FONT);
- iface.addtitle("And Boxes",250,160,LIGHTBLUE,4,SMALL_FONT);
- iface.addfield("",30,150,10,6,TEXT);
- iface.addtitle("A Text field",44,137,DARKGRAY,4,SMALL_FONT);
- iface.addline(240,120,322,120,LIGHTGREEN);
- iface.addline(231,134,267,154,LIGHTCYAN);
- iface.addline(299,148,348,128,CYAN);
- iface.addlbox(231,157,372,177,LIGHTRED);
- iface.addlbox(309,161,367,174,YELLOW);
- iface.addlbox(326,147,377,186,GREEN);
- iface.addbutton("A Really long long button to press",30,181,14,289);
- iface.addbutton("And a shorter one.",98,220,15,164);
- iface.dodialog();
-
- closegraph();
-
- printf("Checkbox: %d\n",iface.get_checkbox_info(3));
-
- printf("Field: %s\n",iface.get_text_field_info(6));
-
- printf("Long button: %d\n",iface.get_button_info(14));
- printf("Short button: %d\n",iface.get_button_info(15));
- }
-
- main()
- {
- initg();
- test_box();
- exit(0);
- }